<!DOCTYPE html>
<html>
<head>
    <title><?php echo $title; ?></title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            line-height: 1.6;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
            border-radius: 5px;
        }
        h1 {
            color: #333;
        }
        .user-card {
            background-color: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            margin-top: 20px;
        }
        .user-info {
            margin-bottom: 10px;
        }
        .user-info strong {
            display: inline-block;
            width: 100px;
            font-weight: bold;
        }
        .back-link {
            display: inline-block;
            margin-top: 20px;
            padding: 8px 16px;
            background-color: #3498db;
            color: white;
            text-decoration: none;
            border-radius: 4px;
        }
        .back-link:hover {
            background-color: #2980b9;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1><?php echo $title; ?></h1>
        
        <?php if ($user): ?>
        <div class="user-card">
            <div class="user-info">
                <strong>ID:</strong> <?php echo $user['id']; ?>
            </div>
            <div class="user-info">
                <strong>姓名:</strong> <?php echo $user['name']; ?>
            </div>
            <div class="user-info">
                <strong>邮箱:</strong> <?php echo $user['email']; ?>
            </div>
            <div class="user-info">
                <strong>年龄:</strong> <?php echo $user['age']; ?>
            </div>
        </div>
        <?php else: ?>
        <p>未找到该用户</p>
        <?php endif; ?>
        
        <a href="/users" class="back-link">返回用户列表</a>
    </div>
</body>
</html>